package com.smedi.ismedi.progress.core.application.query.Impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.api.dto.response.ProgressReportMonthDetailAllResponse;
import com.smedi.ismedi.progress.api.dto.response.ProgressReportWeekDetailAllResponse;
import com.smedi.ismedi.progress.core.application.command.ProgressReportExportQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressReportListQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressReportOneQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressWeekMonthReportCommand;
import com.smedi.ismedi.progress.core.application.query.ProgressReportQueryService;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.*;
import com.smedi.ismedi.progress.core.domain.repository.ProgressReportRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 特种设备应用服务实现类
 *
 * @author xienannan
 * @date 2021/08/28
 */
@Service
@RequiredArgsConstructor
public class ProgressReportQueryServiceImpl implements ProgressReportQueryService {


    private final ProgressReportRepository progressReportRepository;
    @Override
    public ProgressReport getProgressWeekReportOne(ProgressReportOneQuery progressReport) {
        return progressReportRepository.getProgressWeekReportOne(progressReport);
    }

    @Override
    public Page<ProgressReport> getProgressWeekReportList(ProgressReportListQuery progressReportListQueryList) {
        return progressReportRepository.getProgressWeekReportList(progressReportListQueryList);
    }

    @Override
    public Page<ProgressReport> getProgressMonthReportList(ProgressReportListQuery progressReportListQuery) {
        return progressReportRepository.getProgressMonthReportList(progressReportListQuery);
    }

    @Override
    public WeekMonthReportEidt monthWeekReportEidtDetail(ProgressWeekMonthReportCommand progressWeekMonthReportCommand) {
        return progressReportRepository.monthWeekReportEidtDetail(progressWeekMonthReportCommand);
    }

    @Override
    public ProgressReportMonthDetailAllResponse getProgressMonthReportDetail(ProgressReportExportQuery progressReportExportQuery) {
        return progressReportRepository.getProgressMonthReportDetail(progressReportExportQuery);
    }

    @Override
    public List<ProgressReportMonthDetailAllResponse> getProgressMonthReportDetailBatch(ProgressReportExportQuery progressReportExportQuery) {
        return progressReportRepository.getProgressMonthReportDetailBatch(progressReportExportQuery);
    }

    @Override
    public ProgressReportWeekDetailAllResponse getProgressWeekReportDetail(ProgressReportExportQuery progressReportExportQuery) {
        return progressReportRepository.getProgressWeekReportDetail(progressReportExportQuery);
    }

    @Override
    public String monthWeekReportCreateSum(WeekMonthReportType weekMonthReportType) {
        return progressReportRepository.monthWeekReportCreateSum(weekMonthReportType);
    }

    @Override
    public String monthReportCreate(MonthReportCreate monthReportCreate) {
        return progressReportRepository.monthReportCreate(monthReportCreate);
    }

    @Override
    public Boolean weekReportCreate(String date) {
        return progressReportRepository.weekReportCreate(date);
    }

    @Override
    public Boolean monthReportCreateTask() {
        return progressReportRepository.monthReportCreateTask();
    }

    @Override
    public Page<ProgressReport> getProgressWeekMonthReportListApp(ProgressReportListQuery progressReportListQuery) {
        return progressReportRepository.getProgressWeekMonthReportListApp(progressReportListQuery);
    }

    @Override
    public List<ProjectScheduleDetail> getProjectScheduleDetailTaskList(ProgressWeekMonthReportCommand progressWeekMonthReportCommand) {
        return progressReportRepository.getProjectScheduleDetailTaskList(progressWeekMonthReportCommand);
    }
}
